hasCallbacks

Checks if there are any pending posts of messages with callback r in the message queue. Compatibility behavior:

  • SDK 29 and above, this method matches platform behavior.
  • SDK 28 and earlier, this method attempts to call the platform API via reflection, but will throw an unchecked exception if the method has been altered from the AOSP implementation and cannot be called. This is unlikely, but there is no safe fallback case for this method and we must throw an exception as a result.

Return

true if the callback is in the message queue

Parameters

handler

handler on which to call the method

r

callback to look for in the message queue

See also